package com.xiaohao.student_course.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * Created with IntelliJ IDEA.
 *
 * @author 小浩
 * @date 2018-12-12 13:07
 * @package com.xiaohao.student_course.config
 * @description
 */
@Configuration
public class WebConfig implements WebMvcConfigurer {
    @Override
    public void addViewControllers(ViewControllerRegistry registry) {
        registry.addViewController("/").setViewName("login");
        registry.addViewController("/login").setViewName("login");
        registry.addViewController("/index").setViewName("index");
        registry.addViewController("/welcome").setViewName("welcome");
        registry.addViewController("/student/member-add").setViewName("member-add");
        registry.addViewController("/student/member-edit").setViewName("member-edit");
        registry.addViewController("/student/member-password").setViewName("member-password");
        registry.addViewController("/score/query").setViewName("score-query");
        registry.addViewController("/score/course-query").setViewName("course-score-query");
    }
}
/**/